<template>
	<view class="content">
		<view class="box" v-for="item in list" :key="item.id">
			<view class="hao">
				<text class="one">订单编号:</text>
				<text class="two">{{item.orderId}}</text>
				<text class="three">确认收货,以退款</text>
				<image :src="item.cover_img" mode=""></image>
				<text class="gname">{{item.gname}}</text>
				<text class="code">编号:{{item.sku_code}}</text>
				<text class="color">规格:{{item.color_text}}</text>
				
				<text class="time">时间:{{time}}</text>
				
				<text class="total">合计:{{item.order_price}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import { back , backOrder} from "../../../util/user/index.js"
	export default {
		data() {
			return {
				list:[],
				time:''
			};
		},
		
		onLoad(option) {
			
			back({
			  userId:"52aeb3ea2a1f437399fac5e5391a4b2e"
			}).then(res=>{
				console.log(res)
				this.list=res.data.data
				
			})
			
			
			
			
			
		var date = new Date();
		var year = date.getFullYear();
		var month = date.getMonth()+1;
		var day = date.getDate();
		var hour = date.getHours();
		var minute = date.getMinutes();
		var second = date.getSeconds();
		var time = (year+'年'+month+'月'+day+'日 '+hour+':'+minute+':'+second)
		
		console.log(time)
		this.time = time
			// backOrder({
			//   userId:"52aeb3ea2a1f437399fac5e5391a4b2e",
			//   orderId:"676137113812733952",
			//   skuId:"ef0d264577834a10b8982a04f4ca3d2f",
			//   reason:"东西不好看",
			//   status:"1",
			//   count:"1"
			// }).then(res=>{
			// 	console.log(res)
				
			// })
		}
	}
</script>

<style lang="scss">
.content{
	width: 100%;
	// height: 10000px;
	background-color: #999999;
	overflow: hidden;
}
.box{
	width: 350px;
	height: 250px;
	margin-left: 10px;
	margin-top: 20px;
	 background-color: #fff;
	 border-radius: 15px;
	
}
.hao{
	image{
		width: 100px;
		height: 100px;
		margin-left: 10px;
		margin-top: 30px;
	}
}
.total{
	position: absolute;
	left: 250px;
	margin-top: 200px;
}
.time{
	position: absolute;
	left: 30px;
	margin-top: 150px;
}
.color{
	position: absolute;
	margin-top: 90px;
	left: 140px;
	font-size: 14px;
	color: #8c8c8c;
}
.code{
	
	margin-left: 20px;
	position: absolute;
	margin-top: 65px;
	color: #8c8c8c;
}
.gname{
	position: absolute;
	margin-top: 40px;
	left: 140px;
	font-size: 14px;
}
.one{
	margin-left: 10px;
	font-size: 14px;
}
.two{
	font-size: 14px;
	margin-left: 10px;
}
.three{
	font-size: 14px;
	margin-left: 15px;
}
</style>
